package com.sunlg.smarthome.data.weather;

import com.sunlg.smarthome.base.C;

import retrofit2.http.GET;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by sunlg on 2017/5/27.
 */

public interface WeatherService {
    /**
     * 获取实况天气
     * @param city
     * @param key
     * @return
     */
    @GET(C.API.NOW)
    Observable<String> getNow(@Query("city") String city,
                              @Query("key") String key);

    /**
     * 获取生活指数
     * @param city
     * @param key
     * @return
     */
    @GET(C.API.SUGGESTION)
    Observable<String> getSuggestion(@Query("city") String city,
                                     @Query("key") String key);

    /**
     * 获取未来几天天气预报
     * @param city
     * @param key
     * @return
     */
    @GET(C.API.FORECAST)
    Observable<String> getForecast(@Query("city") String city,
                                   @Query("key") String key);

    /**
     * 城市查询
     * @return
     */
    @GET(C.API.SEARCH)
    Observable<String> search(@Query("city") String city,
                              @Query("key") String key);
}
